
ac.skill('碎石斩'){
    temp = '攻击触发',
    on_run = function(self,hero,target)
        hero:add_buff '碎石斩-效果'{skill = self}
    end,
}

local buff = ac.buff['碎石斩-效果']
buff.count = 3
buff.model1 = [[128.mdl]]
function buff:on_add()
    local hero = self.owner
    self:gc(hero:event '单位-攻击命中'(function(_,_,target)
        local point1 = hero:get_point()
        local point2 = target:get_point()
        local angle = point1 / point2
        local damage = self.skill:dmg_get()
        ac.wait(100,function()
            hero:sector_damage(point1,800,angle,80,damage,self)
        end)
        local num = 3
        for a=1,num do
            local r = angle + (a-num/2 -0.5)*25
            local effect = point1:effect{
                model = self.model1,
                angle = r,
                time = 0.2,
            }
        end
        self.count = self.count - 1
        if self.count<=0 then
            self:remove()
        end
    end))
end